<template>
	<view v-for="item in newsList" style="padding: 5rpx;background-color: #eee;">
		<NewsCardView
			:title="item.title"
			:isTop="item.isTop"
			:author="item.author"
			:comments="item.comments"
			:time="item.time"
			:mode= "item.newstype"
			:images="item.imagelist"
			:showSearch = "item.showSearch"
			:bgColor="item.bgcolor"
		>
		<template v-slot:tips>
			<view class="slotcontent">
				<text>搜索：</text>
				<view class="borderbox"><text>今日金价</text></view>
				<view class="borderbox"><text>精选好物</text></view>
			</view>
		</template>
		</NewsCardView>
	</view>
</template>

<script>
	import NewsCardView from '/components/NewsCardView/NewsCardView.vue';
	export default {
		components:{
			NewsCardView
		},
		data() {
			return {
				newsList:[],
			}
		},
		onLoad() {
			this.newsList = getApp().globalData.datalist;
			console.log("onLoad--> newsList: " + this.newsList.length);
		},
		methods: {
			
		}
	}
</script>

<style>
.slotcontent {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
		text-align: center;
		padding-left: 10px;
		color: #aaf;
		font-size: 20rpx;
	}

	.borderbox {
		margin: 5px;
		border-radius: 5px;
		border: 1px solid gray;

	}
</style>